import { createRouter, createWebHistory } from 'vue-router'
const routes = [
  
  {
    path:'/',
    component:()=> import("@/Pages/Login.vue")
  },
  {
    path: '/home',
    name: 'home',
    component: () => import("@/Pages/manage.vue"),
    children:[
      {
        path:'userInfo',
        name:'user',
        component:()=>import("@/childrenPages/user.vue")
      },
      {
        path:'administration',
        name:'administration',
        component:()=>import("@/childrenPages/administration.vue")
      },
      {
        path:'production',
        name:'production',
        component:()=>import("@/childrenPages/production.vue"),
      },
      {
        path:'production/:id',
        name:'checkout',
        component:()=>import("@/childrenPages/checkout.vue")
      },
      {
        path:'comment',
        name:'comment',
        component:()=>import("@/childrenPages/comment.vue")
      },
      {
        path:'contribution',
        name:'contribution',
        component:()=>import("@/childrenPages/contribution.vue")
      },
      {
        path:'carousel',
        name:'carousel',
        component:()=>import("@/childrenPages/carousel.vue")
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
